import request from '@/utils/request'

// 查询异地还车费列表
export function listFee(query) {
  return request({
    url: '/plan/fee/list',
    method: 'get',
    params: query
  })
}

// 查询异地还车费详细
export function getFee(alsoFeeId) {
  return request({
    url: '/plan/fee/' + alsoFeeId,
    method: 'get'
  })
}

// 新增异地还车费
export function addFee(data) {
  return request({
    url: '/plan/fee',
    method: 'post',
    data: data
  })
}

// 修改异地还车费
export function updateFee(data) {
  return request({
    url: '/plan/fee',
    method: 'put',
    data: data
  })
}

// 删除异地还车费
export function delFee(alsoFeeId) {
  return request({
    url: '/plan/fee/' + alsoFeeId,
    method: 'delete'
  })
}

// 导出异地还车费
export function exportFee(query) {
  return request({
    url: '/plan/fee/export',
    method: 'get',
    params: query
  })
}
//门店列表
export function storeList() {
  return request({
    url: '/store/store/alsoFeeStoreList',
    method: 'get'
  })
}
//计算费用
export function calculateDistance(data) {
  return request({
    url: '/plan/fee/storeDistance',
    method: 'put',
    data: data
  })
}

// 启停用
export function stopUsingEnabled(data) {
  return request({
    url: '/plan/fee/stopUsingEnabled',
    method: 'put',
    data: data
  })
}